using System;
using System.Collections.Generic;
using Colorful.Furniture.EnterpriseManagement;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.PermissionManagement
{

    /// <summary>
    /// 管理员
    /// </summary>
    [Table(Name = "sys_manager")]
    public class SysManager
    {

        /// <summary>
        /// 编码
        /// </summary>
        [Column(Name = "id", IsPrimary = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 部门编码
        /// </summary>
        [Column(Name = "department_id")]
        public Guid? DepartmentId { get; set; }

        /// <summary>
		/// 年龄
		/// </summary>
		[Column(Name = "age")]
        public int? Age { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [Column(Name = "avatar", StringLength = 200)]
        public string Avatar { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [Column(Name = "email", StringLength = 50)]
        public string Email { get; set; }

        /// <summary>
        /// 账户状态：是否禁用（0：正常；1：禁用/离职）
        /// </summary>
        [Column(Name = "is_disabled")]
        public bool IsDisabled { get; set; }

        /// <summary>
        /// 管理员类型
        /// </summary>
        [Column(Name = "manager_type")]
        public int? ManagerType { get; set; }

        /// <summary>
        /// 管理员姓名
        /// </summary>
        [Column(Name = "name", StringLength = 50)]
        public string Name { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        [Column(Name = "phone", StringLength = 50)]
        public string Phone { get; set; }

        /// <summary>
        /// 职位
        /// </summary>
        [Column(Name = "position", StringLength = 50)]
        public string Position { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [Column(Name = "sex", StringLength = 10)]
        public string Sex { get; set; }

        /// <summary>
        /// 用户名（冗余）
        /// </summary>
        [Column(Name = "user_name", StringLength = 50)]
        public string UserName { get; set; }

        /// <summary>
        /// 开通时间
        /// </summary>
        [Column(Name = "add_time")]
        public DateTime? AddTime { get; set; }

        /// <summary>
        ///  用户编码
        /// </summary>
        [Column(Name = "user_id")]
        public Guid? UserId { get; set; }

        /// <summary>
        /// 生日
        /// </summary>
        [Column(Name = "birthday")]
        public DateTime? Birthday { get; set; }

        /// <summary>
        ///  是否删除
        /// </summary>
        [Column(Name = "is_deleted")]
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 角色-角色名字（多个角色名字用,符号分割）
        /// </summary>
        [Column(Name = "role_name", StringLength = 50)]
        public string RoleName { get; set; }

        /// <summary>
        /// 角色-角色编码（多个角色名字用,符号分割）
        /// </summary>
        [Column(Name = "role_id", StringLength = 500)]
        public string RoleId { get; set; }

        /// <summary>
        ///  是否超级管理员
        /// </summary>
        [Column(Name = "is_supper")]
        public bool IsSupper { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        [Column(Name = "customer_id")]
        public Guid? CustomerId { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        [Column(Name = "customer_name", StringLength = 500)]
        public string CustomerName { get; set; }


        #region 外键 => 导航属性，ManyToOne/OneToOne


        public virtual Department Department { get; set; }

        #endregion

        #region 外键 => 导航属性，OneToMany


        public virtual List<SysManagerIdentity> ManagerIdentities { get; set; }


        public virtual List<SysManagerLog> ManagerLogs { get; set; }


        public virtual List<SysManagerRole> ManagerRoles { get; set; }

        #endregion

        #region 外键 => 导航属性，ManyToMany

        #endregion
    }

}
